On-demand Evaluation for Maude

نویسندگان

  • Francisco Durán
  • Santiago Escobar
  • Salvador Lucas
چکیده

Strategy annotations provide a simple mechanism for introducing some laziness in the evaluation of expressions. As an eager programming language, Maude can take advantage of them and, in fact, they are part of the language. Maude strategy annotations are lists of non-negative integers associated to function symbols which specify the ordering in which the arguments are (eventually) evaluated in function calls. A positive index enables the evaluation of an argument whereas ‘zero’ means that the function call has to be attempted. The use of negative indices has been proposed to express evaluation on-demand, where the demand is an attempt to match an argument term with the left-hand side of a rewrite rule. In this paper we show how to furnish Maude with the ability of dealing with on-demand strategy annotations.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Towards (constructor) normal forms for Maude within Full Maude

Maude is able to deal with infinite data structures and avoid infinite computations by using strategy annotations, that is, positive indices that indicate which positions can be evaluated. However, they can eventually make the computation of the normal form(s) of some input expressions impossible. In [6,7], we used Full Maude to implement two new commands norm and eval which furnish Maude with ...

متن کامل

Improving On-Demand Strategy Annotations

In functional languages such as OBJ*, CafeOBJ, and Maude, symbols are given strategy annotations which specify (the order in) which subterms are evaluated. Syntactically, they are given either as lists of natural numbers or as lists of integers associated to function symbols whose (absolute) values refer to the arguments of the corresponding symbol. A positive index enables the evaluation of an...

متن کامل

A Natural Implementation of Plural Semantics in Maude

Recently, a new semantics for non-deterministic lazy functional(-logic) programming has been presented, in which the treatment of parameter passing was different to previous proposals like call-time choice (CRWL) and run-time choice (term rewriting). There, the semantics was formalized through the πCRWL calculus, and a program transformation to simulate πCRWL with term rewriting was proposed. I...

متن کامل

OnDemandOBJ : A Laboratory for Strategy Annotations 1

Strategy annotations are used in rule-based programming languages such as OBJ2, OBJ3, CafeOBJ, and Maude to improve efficiency and/or reduce the risk of nontermination. Syntactically, they are given either as lists of natural numbers or as lists of integers associated to function symbols whose (absolute) values refer to the arguments of the corresponding symbol. A positive index forces the eval...

متن کامل

On-demand strategy annotations revisited: An improved on-demand evaluation strategy

In functional languages such as OBJ*, CafeOBJ, and Maude, symbols are given strategy annotations that specify (the order in) which subterms are evaluated. Syntactically, strategy annotations are given either as lists of natural numbers or as lists of integers associated to function symbols whose (absolute) values refer to the arguments of the corresponding symbol. A positive index prescribes th...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Electr. Notes Theor. Comput. Sci.

دوره 124  شماره 

صفحات  -

تاریخ انتشار 2005